package test.repository;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

import test.domain.MenuItem;


@Component
public class MenuRepositoryImpl implements MenuRepository {
	
	  @Autowired
	  @Qualifier("mongoTemplate2")
	  private MongoTemplate mongoTemplate;
	  
	  public void save(MenuItem menuItem){
		  System.out.println(mongoTemplate.getDb());
		  mongoTemplate.save(menuItem);
	  }

	
}
